//
//  NewMonthBaoGaoCollectionViewCell.m
//  wangzhe
//
//  Created by 李 佳伟 on 2018/3/16.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "NewMonthBaoGaoCollectionViewCell.h"
#import "JTCSM.h"
@implementation NewMonthBaoGaoCollectionViewCell

- (id)initWithFrame:(CGRect)frame{
   self = [super initWithFrame:frame];
    if (self) {
        CGFloat  maxCol = 2;
        CGFloat margin = 20;
        CGFloat itemW   = (KSCREENWidth - (margin * (maxCol +1)))/maxCol;
        CGFloat itemH = 130;
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.frame = CGRectMake(0, 0, itemW, itemH);
        
        UILabel *titleLabel = [UILabel initWithFrame:CGRectMake(10, 20, itemW, 20) text:@"累计收益" font:12 textAlignment:NSTextAlignmentLeft texcolor:[df colorWithHexString:@"666666" alpha:1] backgroundColor:nil];
        [self.contentView addSubview:titleLabel];
        
        CGFloat ImageWidth = 50;
        CGFloat imageHeight = ImageWidth*30/39;
        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(itemW-10-ImageWidth, 0, ImageWidth, imageHeight)];
        imageView.image = [UIImage imageNamed:@"yuebaoMonthImage.png"];
        [self.contentView addSubview:imageView];
        
        self.monthLabel = [UILabel initWithFrame:CGRectMake(0, 0, imageView.LC_width, imageView.LC_height) text:@"1月" font:15 textAlignment:NSTextAlignmentCenter texcolor:[df colorWithHexString:@"333333" alpha:1] backgroundColor:nil];
        [imageView addSubview:self.monthLabel];
        
        self.moneyLabel = [UILabel initWithFrame:CGRectMake(10, 50, itemW, 20) text:@"2000000.00元" font:18 textAlignment:NSTextAlignmentLeft texcolor:[df colorWithHexString:@"333333" alpha:1] backgroundColor:nil];
        [self.contentView addSubview:self.moneyLabel];
        
        [df newlineViewWithHeightofTop:85 superView:self.contentView spacing:0 color:RGBACOLOR(241, 241, 241, 1) lineHeight:1];
        
        UILabel *gongjiaLabel = [UILabel initWithFrame:CGRectMake(10, 85, itemW, 45) text:@"共计" font:14 textAlignment:NSTextAlignmentLeft texcolor:[df colorWithHexString:@"666666" alpha:1] backgroundColor:nil];
        [self.contentView addSubview:gongjiaLabel];
        
        
        self.jiaoyiLabel = [UILabel initWithFrame:CGRectMake(10, 85, itemW-20, 45) text:@"855笔" font:14 textAlignment:NSTextAlignmentRight texcolor:[df colorWithHexString:@"666666" alpha:1] backgroundColor:nil];
        [self.contentView addSubview:self.jiaoyiLabel];
        [df layerWithView:self.contentView radius:5 width:0 color:nil];
        [df setTheViewYiYing:self shadowColor:RGBACOLOR(231, 231, 231, 1) shadowOffset:CGSizeMake(3, 3) apla:1];
    
        
    }
    return self;
}
+ (NSString *)ReuseIdentifier{
    return @"euseIdentifier";
}

@end
